<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" href="/logo.ico" type="image/x-icon">
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
		#allmap{width:100%;height:100%;}
		#r-result{width:100%;margin-top:5px;}
		p{margin:5px; font-size:14px;}
	</style>
  <!-- 百度地图3.0 离线API Begin -->
	<script type="text/javascript" src="./map3.0_init.js"></script>
  <script type="text/javascript" src="./map3.0.js"></script>
   <script type="text/javascript" src="./jquery.js"></script>
	<title>离线地图</title>
</head>
<body>
	<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
	// 百度地图API功能，默认缩放 6-11 级别
	var map = new BMap.Map("allmap",{minZoom:6,maxZoom:12});
	map.centerAndZoom(new BMap.Point(108.8795055906614, 34.26000896933732), 12);//设置中心点
	map.enableScrollWheelZoom(true); //启用缩放
	map.enableDragging(); //启用拖拽
	var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});// 左上角，添加比例尺
	var top_left_navigation = new BMap.NavigationControl();  //左上角，添加默认缩放平移控件
	map.addControl(top_left_control);        
	map.addControl(top_left_navigation);

	//网络连通情况下回显示下面路径，网络离线仅显示地图
	var driving = new BMap.DrivingRoute(map, { 
    renderOptions: { 
        map: map, 
        autoViewport: true 
    }
	});
	var start = new BMap.Point(116.310791, 40.003419);
	var end = new BMap.Point(116.486419, 39.877282);
	driving.search(start, end);
</script>
